<template>
  <li>
    <van-cell :label="`点赞${article.likeCount} | 浏览 ${article.views}`">
      <template #title>
        <div class="top">
          <img :src="article.avatar" alt />
          <div class="right-box">
            <!-- <p>第一行</p> -->
            <!-- <p class="line-2">第二行</p> -->
            <p>{{article.stem}}</p>
            <p class="line-2">{{article.creator}} | {{article.createdAt}}</p>
          </div>
        </div>
        <!-- <p class="bottom">第二行</p> -->
        <p class="bottom" v-html="article.content"></p>
      </template>
    </van-cell>
  </li>
</template>

<script>
import logo from '../img/logo.png'
export default {
  name: 'artile-list',
  props: {
    article: {
      type: Object,
      required: true
    }
  },
  components: {},
  data () {
    return {
      logo
    }
  },
  computed: {},
  watch: {},
  created () {},
  mounted () {},
  methods: {

  }
}
</script>

<style lang="scss" scoped>
.top {
  display: flex;
  align-items: center;
  line-height: 1.4;
  img {
    width: 40px;
    height: 40px;
    margin-right: 10px;
  }
  .line-2 {
    color: #999;
    font-size: 12px;
  }
}
.bottom {
  color: #666;
  // padding: 10px 0;
  margin: 10px 0;
  overflow: hidden;
  text-overflow: ellipsis;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}
</style>
